package com.gavin.service;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import com.gavin.util.c3p0Util;

public class BaseInsert 
{
	public void baseInsert(Connection conn)
	{
		String sql = "insert into t_user(nickname,username,password) values(?,?,?)";
		PreparedStatement p ;
		try
		{
			p = conn.prepareStatement(sql);
			p.setString(1, "测试");
			p.setString(2, "文");
			p.setString(3, "123456");
			
			p.executeUpdate();
			p.close();
			conn.close();
		} catch (SQLException e)
		{
			e.printStackTrace();
		}
	}
	
}
